package com.ruicar.afs.cloud.manage.outer.api.common.feign;

import com.ruicar.afs.cloud.common.core.query.QueryCondition;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.manage.outer.api.common.dto.ApplyRecordConditionDto;
import com.ruicar.afs.cloud.manage.outer.api.common.dto.ManageUpcomeTasksRecordDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * <p>Description: </p>
 *
 * @author xudongdong
 * @version 1.0
 * @date create on 2020-07-21 18:54
 */
@FeignClient(name = "contract-manage-common", url = "${com.greatwall.services.manage.url}")
public interface CommonFeign {

    /**
     * 根据合同号校验是否可以办理业务
     * @author xudongdong
     * @param applyRecordCondition 操作参数封装
     * @param headers 请求头
     * @return
     */
    @ApiOperation("根据合同号校验是否可以办理业务")
    @PostMapping(value = "applyRecord/findByContractNo")
    public IResponse findByContractNo(@RequestBody ApplyRecordConditionDto applyRecordCondition, @RequestHeader Map<String, String> headers);

    /**
     * 根据合同号码、案件编号查询审批历史信息
     * @author xudongdong
     * @param caseNo 案件号, contractNo 合同号码
     * @param headers 请求头
     * @return
     */
    @ApiOperation("根据合同号码、案件编号查询审批历史信息")
    @PostMapping(value = "approveHistory/findByContractNo")
    public IResponse findByContractNo(@RequestParam("contractNo") String contractNo, @RequestParam("caseNo") String caseNo, @RequestHeader Map<String, String> headers);

    /**
     * 待办任务一览
     * @author xudongdong
     * @param condition 操作参数封装
     * @param headers 请求头
     * @return
     */
    @ApiOperation("待办任务一览")
    @PostMapping(value = "findUpcomeTasks/findUpcomeTasksList")













    public IResponse findUpcomeTasksList(@RequestBody QueryCondition<ManageUpcomeTasksRecordDto> condition, @RequestHeader Map<String, String> headers);
}
